import java.io.*;
import java.util.*;

public class P2PFile {
  private static final boolean BUSY = false;
  private static final boolean AVAILABLE = true;

  private File file;
  private int client;
  private boolean state;

  public P2PFile(File file, int client) {
    this.file = file;
    this.client = client;
    this.state = AVAILABLE;
  }

  public boolean fileAvailable() {
    return this.state;
  }

  public void changeState(){
    if (fileAvailable()) {
      this.state = BUSY;
    } else {
      this.state = AVAILABLE;
    }
  }

  public File getFile() {
    return this.file;
  }
  public void setFile(File file) {
    this.file = file;
  }

  public int getClient() {
    return this.client;
  }
  public void setClient(int client) {
    this.client = client;
  }
}